package com.tensquare.notice.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 文章
 * </p>
 *
 * @author XXX
 * @since 2022-11-09
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TbNotice对象", description="文章")
public class TbNotice implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(type = IdType.INPUT)
    private String id;

    @ApiModelProperty(value = "接受消息用户的ID")
    @TableField("receiverId")
    private String receiverid;

    @ApiModelProperty(value = "进行操作用户的ID")
    @TableField("operatorId")
    private String operatorid;

    @ApiModelProperty(value = "进行操作用户的昵称")
    //代表不属于数据库的属性
    @TableField(exist = false)
    private String operatorName;

    @ApiModelProperty(value = "操作类型(评论、点赞等)")
    private String action;

    @ApiModelProperty(value = "被操作对象,例如文章,评论等")
    @TableField("targetType")
    private String targettype;

    @ApiModelProperty(value = "被操作对象的Id,例如文章的Id,评论的Id")
    @TableField("targetId")
    private String targetid;

    @ApiModelProperty(value = "对象名称或简介")
    //代表不属于数据库的属性
    @TableField(exist = false)
    private String targetName;//对象名称或简介

    @ApiModelProperty(value = "发表日期")
    private Date createtime;

    @ApiModelProperty(value = "通知类型:sys系统消息;user用户信息")
    private String type;

    @ApiModelProperty(value = "消息状态（0 未读，1 已读")
    private String state;


}
